using System;
using System.ComponentModel.DataAnnotations;

namespace SIOGDE.AccesoDatos.Entidades
{
 public partial class PersonaArma
 {
     public PersonaArma()
     {
     }
     #region foreign Keys

     public virtual int ArmaId_FK {get;set;}
     private Arma ArmaId_obj ;
     public virtual Arma Arma
      {
          get { return ArmaId_obj; }
          set {
                ArmaId_obj = value;
                if (ArmaId_obj != null) ArmaId_FK = ArmaId_obj.Id; 
          }
      }

     public virtual int PersonaId_FK {get;set;}
     private Persona PersonaId_obj ;
     public virtual Persona Persona
      {
          get { return PersonaId_obj; }
          set {
                PersonaId_obj = value;
                if (PersonaId_obj != null) PersonaId_FK = PersonaId_obj.Id; 
          }
      }
     #endregion
     public virtual int   Id { get; set;}

     [Required(ErrorMessage="EsActual es requerido.")]
     [Display(Name = "EsActual")]
     public virtual bool   EsActual { get; set;}

     [StringLength(100, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "MotivoActualizacion")]
     public virtual string   MotivoActualizacion { get; set;}

     [StringLength(100, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "Descripcion")]
     public virtual string   Descripcion { get; set;}

     [Required(ErrorMessage="FechaCreacion es requerido.")]
     [DataType(DataType.Date)]
     [Display(Name = "FechaCreacion")]
     public virtual DateTime   FechaCreacion { get; set;}

     [Required(ErrorMessage="FechaActualizacion es requerido.")]
     [DataType(DataType.Date)]
     [Display(Name = "FechaActualizacion")]
     public virtual DateTime   FechaActualizacion { get; set;}

     [StringLength(50, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "ActualizadoPor")]
     public virtual string   ActualizadoPor { get; set;}
 }
}

